
package com.shop.cloud.mall.common.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import lombok.Data;
import lombok.EqualsAndHashCode;
import jakarta.validation.constraints.NotNull;
import java.math.BigDecimal;
import java.time.LocalDateTime;

import io.swagger.v3.oas.annotations.media.Schema;

/**
 * 分销员
 *
 * @author
 * @date 2021-04-25 17:40:35
 */
@Data
@TableName("distribution_user")
@EqualsAndHashCode(callSuper = true)
@Schema(description = "分销员")
public class DistributionUser extends Model<DistributionUser> {
    private static final long serialVersionUID=1L;

    /**
     * PK
     */
    @TableId(type = IdType.INPUT)
    @NotNull(message = "PK不能为空")
    @Schema(description = "PK/商城用户ID")
    private String userId;
    /**
     * 所属租户
     */
    @NotNull(message = "所属租户不能为空")
    @Schema(description = "所属租户")
    private String tenantId;
    /**
     * 逻辑删除标记（0：显示；1：隐藏）
     */
    @NotNull(message = "逻辑删除标记（0：显示；1：隐藏）不能为空")
    @Schema(description = "逻辑删除标记（0：显示；1：隐藏）")
    private String delFlag;
    /**
     * 创建时间
     */
    @NotNull(message = "创建时间不能为空")
    @Schema(description = "创建时间")
    private LocalDateTime createTime;
    /**
     * 最后更新时间
     */
    @NotNull(message = "最后更新时间不能为空")
    @Schema(description = "最后更新时间")
    private LocalDateTime updateTime;
    /**
     * 累计佣金金额
     */
    @NotNull(message = "累计佣金金额不能为空")
    @Schema(description = "累计佣金金额")
    private BigDecimal commissionTotal;
    /**
     * 已提现佣金金额
     */
    @NotNull(message = "已提现佣金金额不能为空")
    @Schema(description = "已提现佣金金额")
    private BigDecimal commissionWithdrawal;
    /**
     * 版本号
     */
    @Version
    private Integer version;

	@TableField(exist = false)
	private UserInfo userInfo;
}
